<!DOCTYPE html>
<html>
<head>
  <title>跳蚤市场</title>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <load href="__PUBLIC__/css/bootstrap.css" />
  <load href="__PUBLIC__/css/schoolshop.css" />
  <load href="__PUBLIC__/js/jquery-1.11.2.js" />
  <load href="__PUBLIC__/js/bootstrap.js" />
  <load href="__PUBLIC__/Matrix/js/matrix.js" />
  <load href="__PUBLIC__/js/jquery.masonry.min.js"></script>
</head>
<body>
 <nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container">
            <if condition="!empty($cateRow)">
               <php>
              function showTree($data) {
                  echo '<ul class="nav navbar-nav">';
                  echo '<li><a href="/Index/index">首页</a></li>';
                  foreach ($data as $key => $val) {
                      echo ' <li class="dropdown">';
                      echo '<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">'.$val['catename'].'<span class="caret"></span></a>';
                      if (!empty($val['childs'])) {
                        echo '<ul class="dropdown-menu" role="menu">';
                        foreach ($val['childs'] as $key => $val) {
                          echo '<li><a href="#">'.$val['catename'].'</a></li>';
                        }
                        echo '</ul>';
                      }
                      
                      echo '</li>';
                  }
                  echo '</ul>';
              }
              showTree($cateRow);
              </php>
              </if>
            <!--            
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#">Link</a></li>
            <li><a href="#">Link</a></li>
            -->
    <ul class="nav navbar-nav navbar-right">
            <li><a href="/Index/release"><button type="button" class="btn btn-success navbar-btn navbtn">发布宝贝</button></a></li>
            <li><a href="/Index/register"><button type="button" class="btn btn-success navbar-btn navbtn">注册</button></a></li>
            <li><a href="/Com/login"><button type="button" class="btn btn-success navbar-btn navbtn">登陆</button></a></li>
            <li><a href="/User/index"><button type="button" class="btn btn-success navbar-btn navbtn">个人中心</button></a></li>
    </ul>
  </div>
</nav>